Count per inch calibration method and optical navigation device

ABSTRACT

An optical navigation device, comprising: an optical sensor, configured to sense optical data; and a processing circuit, configured to compute motions of the optical navigation device based on the optical data, and configured to output the motions, wherein a first CPI is set to the processing circuit. The processing circuit receives a calibration command to calibrate the first CPI to a second CPI, wherein the second CPI is computed via following steps: (a) computing a real CPI corresponding to times of motions output by the processing circuit during a time interval that a relative displacement between the optical navigation device and a surface reaches a first predetermined distance; (b) computing a ratio between the real CPI and the first CPI or a difference between the real CPI and the first CPI; and (c)generating the second CPI based on the ratio or the difference.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No.63/160,937, filed on Mar. 15, 2021, the contents of which areincorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a CPI (Counter Per Inch) calibrationmethod and an optical navigation device, and particularly relates to aCPI calibration method and an optical navigation device which cancalibrate CPI based on a calibration ruler pattern.

2. Description of the Prior Art

A CPI is an important parameter fora conventional optical mouse, sinceCPI means a frequency that the optical mouse outputs motions thereof toa host such as a computer. If the CPI is too low, the user may feel theoptical mouse does not move smoothly. On the opposite, if the CPI is toohigh, the user may feel the optical mouse moves too fast. Therefore, itis necessary to set a proper CPI to the optical mouse.

Due to the assembling process, component manufacturing process or thefirmware installed to the optical mouse, the real CPI and the CPI set tothe optical mouse may be different. However, conventional CPIcalibration methods do not provide a recommended CPI or need complicatedequipment's.

Therefore, a new CPI calibration mechanism is needed.

SUMMARY OF THE INVENTION

One objective of the present invention is to provide an opticalnavigation device which can calibrate CPI via simple steps.

Another objective of the present invention is to provide a CPIcalibration method which can calibrate CPI via simple steps.

One embodiment of the present invention discloses an optical navigationdevice, comprising: an optical sensor, configured to sense optical data;and a processing circuit, configured to compute motions of the opticalnavigation device based on the optical data, and configured to outputthe motions, wherein a first CPI is set to the processing circuit. Theprocessing circuit receives a calibration command to calibrate the firstCPI to a second CPI, wherein the second CPI is computed via followingsteps: (a) computing a real CPI corresponding to times of motions outputby the processing circuit during a time interval that a relativedisplacement between the optical navigation device and a surface reachesa first predetermined distance; (b) computing a ratio between the realCPI and the first CPI or a difference between the real CPI and the firstCPI; and (c)generating the second CPI based on the ratio or thedifference.

Another embodiment of the present invention discloses: a CPI calibrationmethod, configured to calibrate a CPI of an optical navigation devicecomprising an optical sensor and a processing circuit. The CPIcalibration method comprising: (a) sensing optical data via the opticalsensor; (b) applying the processing circuit to compute motions of theoptical navigation device based on the optical data by the opticalsensor, and applying the processing circuit to output the motions,wherein a first CPI is set to the processing circuit; (c) computing areal CPI corresponding to times of motions output by the processingcircuit during a time interval that a relative displacement between theoptical navigation device and a surface reaches a first predetermineddistance; (d) computing a ratio between the real CPI and the first CPIor a difference between the real CPI and the first CPI; (e) generating asecond CPI based on the ratio or the difference; and (f) calibrating thefirst CPI to the second CPI.

In view of above-mentioned embodiments, the CPI of an optical navigationdevice can be calibrated via simple steps.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram illustrating an optical mouse according toone embodiment of the present invention.

FIG. 2 is a schematic diagram illustrating a CPI calibration methodaccording to one embodiment of the present invention.

FIG. 3 is a schematic diagram illustrating a calibration ruler pattern,according to one embodiment of the present invention.

FIG. 4 is a schematic diagram illustrating how to calibrate a CPI of theoptical mouse when the calibration ruler pattern is displayed on adisplay.

FIG. 5, FIG. 6 and FIG. 7 are schematic diagrams illustrating that thecalibration ruler pattern is displayed on the display, according todifferent embodiments of the present invention.

FIG. 8 is a flow chart illustrating a CPI calibration method, accordingto one embodiment of the present invention.

DETAILED DESCRIPTION

Several embodiments are provided in following descriptions to explainthe concept of the present invention. Each component in followingdescriptions can be implemented by hardware (e.g. a device or a circuit)or hardware with software (e.g. a program installed to a processor).Besides, the method in following descriptions can be executed byprograms stored in a non-transitory computer readable recording mediumsuch as a hard disk, an optical disc or a memory. Additionally, the term“first”, “second”, “third” in following descriptions are only for thepurpose of distinguishing different one elements, and do not mean thesequence of the elements. For example, a first device and a seconddevice only mean these devices can have the same structure but aredifferent devices.

FIG. 1 is a schematic diagram illustrating an optical mouse 100according to one embodiment of the present invention. Please note, infollowing embodiments, an optical mouse is used as an example forexplaining the concepts of the present invention. However, the opticalmouse can be replaced by any other optical navigation device.

As illustrated in FIG. 1, the optical mouse 100 comprises a processingcircuit 101 and an optical sensor 103. The optical sensor 103 isconfigured to sense optical data. The optical data can be images, or anyother optical data comprising optical feature. The processing circuit101 is configured to compute motions of the optical mouse 100 based onthe optical data, and configured to output the motion. For example, theoptical mouse 100 is connected to a computer and outputs the motionsthereof to the computer. A first CPI is set to the processing circuit101. That is, the processing circuit 101 is supposed to output motionsat the first CPI. Please note, although the embodiments of the presentinvention depicts that the motions are output by the processing circuit101, it does not limit that the motions are output by the processingcircuit 101. The motions can be output by any other device coupled tothe processing circuit 101. Besides, other data besides the motions canalso be output by the processing circuit 101. Therefore, in oneembodiment, the processing circuit 101 is supposed to output data, whichis motion or not motion, at the first CPI. In following embodiments,only the motion is used as an example for explaining.

However, the real CPI of the processing circuit 101 may be differentfrom the first CPI, due to various reasons. Therefore, the processingcircuit 101 can receive a calibration command to calibrate the first CPIto a second CPI, thereby the optical mouse 100 can really output motionsat the first CPI. The second CPI can be acquired by various methods. Inone embodiment, the second CPI is acquired after a relative displacementbetween the optical navigation device 100 and a surface reaches a firstpredetermined distance.

FIG. 2 is a schematic diagram illustrating a CPI calibration methodaccording to one embodiment of the present invention. In the embodimentshown in FIG. 2, the processing circuit 101 is supposed to operate atthe first CPI CPI_1. Then, areal CPI CPI_R corresponding to times ofmotions output by the processing circuit 101 during a time interval thata relative displacement between the optical navigation device 100 and asurface Sr reaches a first predetermined distance d1 is computed. Pleasenote, the relative displacement may occur when the optical mouse 100moves but the surface Sr stops, or occurs when the optical mouse 100stops but the surface Sr moves.

Next, a ratio between the real CPI CPI_R and the first CPI CPI_1 or adifference between the real CPI CPI_R and the first CPI CPI_1 iscomputed. After that, the second CPI is generated based on the ratio orthe difference.

For example, if the first CPI CPI_1 is 8000 and the real CPI CPI_R is6000, the ratio between the first CPI CPI_1 and the real CPI CPI_R is8000/6000=1.3334. That is, the ratio between the CPI set to theprocessing circuit 101 and the real CPI is 1.3334 Therefore, if theprocessing circuit 101 is desired to operate at the real CPI 8000, theCPI set to the optical mouse 100 can be 8000*1.3334=10667. That is, theCPI set to the processing circuit 101 is changed from 8000 (the firstCPI CPI_1) to 10667 (the second CPI CPI_2).

Many methods can be applied to determine whether the relativedisplacement between the optical navigation device 100 and the surfaceSr reaches the first predetermined distance or not. In one embodiment, acalibration ruler pattern is provided as the surface Sr for suchdetermination. FIG. 3 is a schematic diagram illustrating a calibrationruler pattern, according to one embodiment of the present invention. Asillustrated in FIG. 3, the calibration ruler pattern 300 comprises aplurality of rectangles Rec. Also, each of the rectangles Rec has aplurality of mark regions MR1-MR4 (only four of them are marked) . Formore detail, the rectangles Rec are repeatedly arranged and each of therectangles Rec comprises identical numbers of the mark regions, forexample, 8 mark regions.

In such case, the processing circuit 101 determines if the relativedisplacement reaches the first predetermined distance according towhether the optical sensor 103 senses the mark regions. For more detail,the rectangle Rec has a first side (e.g., the left side) , and a secondside (e.g., the right side) opposite to the first side, the processingcircuit 101 determines if the relative displacement reaches the firstpredetermined distance according to whether the optical sensor sensesthe mark regions on the first side and the mark regions on the secondside at different time. For example, if the optical sensor 103 sensesthe mark region MR1 first and then senses the mark region MR3, theprocessing circuit 101 determines that a relative displacement da (thefirst predetermined distance) exists between the optical mouse 100 andthe calibration ruler pattern 300. Similarly, if the optical sensor 103senses the mark region MR2 first and then senses the mark region MR4,the processing circuit 101 determines that a relative displacement db(the first predetermined distance) exists between the optical mouse 100and the calibration ruler pattern 300.

The mark regions can have various contents. In one embodiment, the markregions respectively have a specific pattern. For example, the markregion MR1 has a circle shape and the mark region MR3 has a triangleshape. In such example, the processing circuit 101 determines if therelative displacement reaches the first predetermined distance accordingto whether the optical sensor 103 senses the specific patterns. Forexample, if the optical sensor 103 senses the circle shape first andthen senses the triangle shape, the processing circuit 101 determinesthat a relative displacement da exists between the optical mouse 100 andthe calibration ruler pattern 300.

In another embodiment, the mark regions respectively have a gray leveldistribution. For example, if the whole gray level distribution of therectangle Rec is from 0% to 100%, the mark region MR1 has a gray leveldistribution between 0% to 5%, the mark region MR2 has a gray leveldistribution between 5% to 22%, the mark region MR3 has a gray leveldistribution between 73% to 90%, and the mark region MR4 has a graylevel distribution between 90% to 100%. In such example, the processingcircuit 101 determines if the relative displacement reaches the firstpredetermined distance according to whether the optical sensor 103senses gray level variations caused by the gray level distributions ofdifferent mark regions. In one embodiment, the calibration ruler pattern300 can be coded such that a series of digital codes can be used toindicate the gray level distributions.

The following Table 1 is an example illustrating digital codesindicating the gray level variations between different mark regions.

TABLE 1 MR1 MR2 MR3 MR4 MR1 000110 001100 010010 MR2 000000 001101010011 MR3 000001 000111 010100 MR4 000010 001000 001110

For example, if the processing circuit 101 detects that the gray levelvariation which is represented by digital codes 010010 occurs, it meansthe optical mouse from the mark region MR1 to the mark region MR4. Also,if the processing circuit 101 detects than the gray level variationwhich is represented by digital codes 001101 occurs, it means theoptical mouse from the mark region MR2 to the mark region MR3. Pleasenote, the digital codes indicating the gray level variations may bedifferent when different algorithms are used.

The calibration ruler pattern 300 can be provided in different ways. Inone embodiment, the calibration ruler pattern 300 is provided on apaper. In such case, the optical mouse 100 can move on the paper for CPIcalibration, but the paper does not move. In another embodiment, thecalibration ruler pattern 300 is displayed on a display. The display canbe, for example, a touch screen or an epaper. In such case, the opticalmouse 100 can move on the display for CPI calibration, but the displayand the calibration ruler pattern 300 do not move. On the contrary, theoptical mouse 100 can stop on the display for CPI calibration, and onlythe calibration ruler pattern 300 moves.

FIG.4 is a schematic diagram illustrating how to calibrate a CPI of theoptical mouse when the calibration ruler pattern 300 is displayed on adisplay. As illustrated in FIG.4, the calibration ruler pattern 300 canbe displayed on the display 401 of the mobile phone 400, and the opticalmouse 100 is put on the display 401. In such case, the optical mouse 100does not move while calibrating CPI. On the contrary, a user can scrollthe calibration ruler pattern 300 to cause relative displacementsbetween the optical mouse 100 and the calibration ruler pattern 300.

The calibration ruler pattern 300 can be displayed on the display 401 indifferent directions. FIG. 5, FIG. 6 and FIG. 7 are schematic diagramsillustrating how the calibration ruler pattern is displayed on thedisplay, according to different embodiments of the present invention. Inthe embodiment of FIG. 5, the mobile phone 400 is in a portrait mode,and the calibration ruler pattern 300 is displayed in parallel with anupper edge and a lower edge of the display 401. Also, in the embodimentof FIG. 6, the mobile phone 400 is in a portrait mode, and thecalibration ruler pattern 300 is displayed perpendicular with an upperedge and a lower edge of the display 401. Additionally, in theembodiment of FIG. 7, the mobile phone 400 is in a portrait mode, andthe calibration ruler pattern 300 is displayed neither perpendicularwith nor parallel with an upper edge and a lower edge of the display401. The display of the calibration ruler pattern 300 can follow rulesshown in FIG. 5, FIG. 6 and FIG. 7 when the mobile phone 400 operates ina landscape mode.

The above-mentioned CPI calibration methods can be performed in variousscenarios. For example, the CPI can be calibrated for the optical mouseafter the manufacturing of the optical mouse in the factory. Also, theCPI can be calibrated when the user is playing a game. Further, the CPIcalibration method can be triggered by various methods. For example, theCPI calibration method can be triggered by a button on the opticalmouse, or triggered by a icon shown on a user interface displayed by adisplay controlled by a host which the optical mouse is connected.

Based on above-mentioned embodiments, a CPI calibration method can beacquired, which is for calibrating a CPI of an optical navigation devicecomprising an optical sensor and a processing circuit, such as theoptical mouse illustrated in FIG. 1. FIG. 8 is a flow chart illustratinga CPI calibration method, according to one embodiment of the presentinvention, which comprises following steps:

Step 801

Sense optical data via the optical sensor.

Step 803

Apply the processing circuit to compute motions of the opticalnavigation device based on the optical data by the optical sensor, andapply the processing circuit to output the motions, wherein a first CPIis set to the processing circuit. That is, the processing circuit issupposed to operate at the first CPI.

Step 805

Compute a real CPI corresponding to times of motions output by theprocessing circuit during a time interval that a relative displacementbetween the optical navigation device and a surface reaches a firstpredetermined distance. Such step can be implemented via a calibrationruler pattern, as shown in FIG. 3.

Step 807

Compute a ratio between the real CPI and the first CPI or a differencebetween the real CPI and the first CPI.

Step 809

Generate a second CPI based on the ratio or the difference.

Step 811

Calibrate the first CPI to the second CPI.

In view of above-mentioned embodiments, the CPI of an optical navigationdevice can be calibrated via simple steps.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

What is claimed is:
 1. An optical navigation device, comprising: anoptical sensor, configured to sense optical data; and a processingcircuit, configured to compute motions of the optical navigation devicebased on the optical data, and configured to output the motions, whereina first CPI is set to the processing circuit; wherein the processingcircuit receives a calibration command to calibrate the first CPI to asecond CPI, wherein the second CPI is computed via following steps: (a)computing a real CPI corresponding to times of motions output by theprocessing circuit during a time interval that a relative displacementbetween the optical navigation device and a surface reaches a firstpredetermined distance; (b) computing a ratio between the real CPI andthe first CPI or a difference between the real CPI and the first CPI;and (c)generating the second CPI based on the ratio or the difference.2. The optical navigation device of claim 1, wherein the step (a)further comprises: (a1) providing a calibration ruler pattern, whereinthe calibration ruler comprises a plurality of mark regions; (a2)determining if the relative displacement reaches the first predetermineddistance according to whether the optical sensor senses the mark regionsat different time.
 3. The optical navigation device of claim 2, whereinthe mark regions respectively have a specific pattern, and the step (a2)determines if the relative displacement reaches the first predetermineddistance according to whether the optical sensor senses the specificpatterns.
 4. The optical navigation device of claim 2, wherein the markregions respectively have a gray level distribution, and the step (a2)determines if the relative displacement reaches the first predetermineddistance according to whether the optical sensor senses gray levelvariations caused by the gray level distributions of different markregions.
 5. The optical navigation device of claim 4, wherein the step(a2) further comprises: coding the image such that the gray levelvariations can be indicated by a plurality of the digital codes;determining the relative displacement reaches the first predetermineddistance according to the digital code.
 6. The optical navigation deviceof claim 2, wherein the calibration ruler pattern has a plurality ofrectangles, wherein the rectangles are repeatedly arranged and each ofthe rectangle comprises identical numbers of the mark regions.
 7. Theoptical navigation device of claim 6, wherein the rectangle has a firstside and a second side opposite to the first side, wherein the step (a2)determines if the relative displacement reaches the first predetermineddistance according to whether the optical sensor senses the mark regionson the first side and the mark regions on the second side at differenttime.
 8. The optical navigation device of claim 1, wherein thecalibration ruler pattern is printed on a paper.
 9. The opticalnavigation device of claim 1, wherein the calibration ruler pattern isdisplayed on a display.
 10. The optical navigation device of claim 1,wherein the optical navigation device is an optical mouse.
 11. A CPIcalibration method, configured to calibrate a CPI of an opticalnavigation device comprising an optical sensor and a processing circuit,the CPI calibration method comprising: (a) sensing optical data via theoptical sensor; (b) applying the processing circuit to compute motionsof the optical navigation device based on the optical data by theoptical sensor, and applying the processing circuit to output themotions, wherein a first CPI is set to the processing circuit; (c)computing a real CPI corresponding to times of motions output by theprocessing circuit during a time interval that a relative displacementbetween the optical navigation device and a surface reaches a firstpredetermined distance; (d) computing a ratio between the real CPI andthe first CPI or a difference between the real CPI and the first CPI;(e)generating a second CPI based on the ratio or the difference; and(f)calibrating the first CPI to the second CPI.
 12. The CPI calibrationmethod of claim 11, wherein the step (c) further comprises: (c1)providing a calibration ruler pattern, wherein the calibration rulercomprises a plurality of mark regions; (c2) determining if the relativedisplacement reaches the first predetermined distance according towhether the optical sensor senses the mark regions at different time.13. The CPI calibration method of claim 12, wherein the mark regionsrespectively have a specific pattern, and the step (c2) determines ifthe relative displacement reaches the first predetermined distanceaccording to whether the optical sensor senses the specific patterns.14. The CPI calibration method of claim 12, wherein the mark regionsrespectively have a gray level distribution, and the step (c2)determines if the relative displacement reaches the first predetermineddistance according to whether the optical sensor senses gray levelvariations caused by the gray level distributions of different markregions.
 15. The CPI calibration method of claim 14, wherein the step(c2) further comprises: coding the image such that the gray levelvariations can be indicated by a plurality of the digital codes;determining the relative displacement reaches the first predetermineddistance according to the digital code.
 16. The CPI calibration methodof claim 12, wherein the calibration ruler pattern has a plurality ofrectangles, wherein the rectangles are repeatedly arranged and each ofthe rectangle comprises identical numbers of the mark regions.
 17. TheCPI calibration method of claim 16, wherein the rectangle has a firstside and a second side opposite to the first side, wherein the step (c2)determines if the relative displacement reaches the first predetermineddistance according to whether the optical sensor senses the mark regionson the first side and the mark regions on the second side at differenttime.
 18. The CPI calibration method of claim 11, wherein thecalibration ruler pattern is printed on a paper.
 19. The CPI calibrationmethod of claim 11, wherein the calibration ruler pattern is displayedon a display.
 20. The CPI calibration method of claim 11, wherein theoptical navigation device is an optical mouse.